<template>
	<view class="gui-bg-white gui-padding-middle">
		<view v-for="(item,index) in list" :key="index" class="gui-flex gui-space-between gui-border-b gui-padding-y">
			<image v-if="item.user && item.user.u_thumb" :src="item.user.u_thumb"
				style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>

			<image v-else :src="$store.state.base.erweima" style="width: 100rpx;height: 100rpx;border-radius: 50%;">
			</image>
			<view class="gui-flex1 gui-padding-x">
				<view v-if="item.user && item.user.u_name" class="gui-text">{{item.user.u_name}}</view>
				<view v-else class="gui-text">{{'用户' + item.u_id}}</view>
				<view class="gui-margin-top-middle">
					<gui-star :activecolor="base.qjcolor" fontSize="30rpx" :totalstars="5" :starnum="item.p_score"
						:cantap="false"></gui-star>
				</view>
				<view class="gui-padding-small gui-margin-top-middle gui-text-small">{{item.p_content}}
				</view>
				<view class="gui-text-small gui-margin-top-middle gui-color-gray">{{item.p_time}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "hyb-comments",
		props: {
			list: {
				type: Array,
				default: [],
			},
		},
		data() {
			return {};
		},

		computed: {
			base: () => {
				return uni.storage.get("base");
			}
		},

		created() {
			console.log(this.list)
		},
		methods: {

		}
	}
</script>

<style>
</style>
